<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
   <script src="jQuery复习/jquery-3.3.1.js"></script>
 </head>
 <body>
    <button id="btn_1">empty</button>
	<button id="btn_2">remove</button>
	<button id="btn_3">detach</button>
	<p>empty,remove,detach</p>
 </body>
 <script>
    $(function(){
	    $("#btn_1").on("click",function(){
		   $("p").empty();
		});

		$("#btn_2").on("click",function(){
		   $("p").remove();
		});

		$("#btn_3").on("click",function(){
		   var $p = $("p").detach();
           console.log($p);
		});
	});
     

 </script>
</html>
